1. Technical Field
The present invention relates to decoding compressed video signals, and more particularly relates to a system and method for scaling the processing of B pictures in a motion compensation system of an MPEG-2 video decoder.
2. Related Art
The MPEG standards are an evolving set of standards for video and audio compression developed by the Moving Picture Experts Group (MPEG). MPEG-1 was designed for coding progressive video at a transmission rate of about 1.5 million bits per second. It was designed specifically for Video-CD and CD-i media. MPEG-2 was designed for coding interlaced images at transmission rates above 4 million bits per second. The MPEG-2 standard is used for various applications, such as digital television (DTV) broadcasts, digital versatile disk (DVD) technology, and video storage systems.
According to the MPEG-2 standard, a video sequence is divided into a series of GOPs (Group Of Pictures). Each GOP begins with an Intra-coded picture (I picture) followed by an arrangement of forward Predictive-coded pictures (P pictures) and Bi-directionally predictive-coded pictures (B pictures). I pictures are fields or frames coded as a stand-alone still image. P pictures are fields or frames coded relative to the nearest I or P picture, resulting in forward prediction processing. P pictures allow more compression than I pictures through the use of motion compensation, and also serve as a reference for B pictures and future P pictures. B pictures are coded with fields or frames that use the most proximate past and future I and P pictures as references, resulting in bi-directional prediction.
As digital TV gradually begins to dominate the TV market and other video applications become more desirable, the demand for systems having advanced capabilities for processing MPEG-2 pictures becomes stronger and stronger. The current emerging architecture for processing MPEG-2 pictures, such as that found in DTV set-top boxes and high end digital TV""s, typically utilize a combination of a digital signal processing central processing units (DSPCPU), control processors, coprocessors, and software applications. Unfortunately, even with all these resources, advanced audio/visual processing functions tend to consume more computational power than is often available.
One of the key elements in MPEG-2 processing is the MPEG-2 decoder, which converts a bitstream 11 of compressed MPEG-2 data into pixel images. The main components of a standard MPEG-2 decoder 10 are shown in FIG. 1. There are four functional blocks: a variable length decoder (VLD) 12, an inverse quantization (IQ) system 14, an inverse discrete cosine transform system (IDCT) 16, and a motion compensation (MC) system 18. Memory 20 is used to store the reference frames. The adder 22 combines the error residuals output from IDCT 16 with motion compensation results to form the final video output 24. Unfortunately, each of these functional components consume a significant amount of computational power, which drives up the cost, and limits the flexibility of digital video systems using MPEG-2 technology. Accordingly, making a highly efficient, cost effective decoder remains one of the main goals of all electronics manufacturers.
One solution for addressing the processing requirements of MPEG-2 decoders is to provide specialized hardware systems that increase computational power. Unfortunately, while overall hardware costs continue to decrease, the costs involved in designing and building specialized hardware such as this increase the expense of the decoder.
A preferred solution therefore is to implement as much functionality as possible in software, which provides significant cost and flexibility advantages over hardware solutions. In particular, software solutions reduce the need for expensive hardware, such as coprocessors, and will allow multiple video functions to run concurrently on a DSPCPU core. However, software applications tend to run too slow to handle occasions when computationally intensive applications are required. Accordingly, a need exists to provide enhanced software systems that will provide inexpensive MPEG-2 decoder solutions while maintaining an acceptable level of video quality.
This invention overcomes the above-mentioned problems, as well as others, by providing a decoder system in which the complexity of B picture processing is scaled by a scalable motion compensation system. In a first aspect, the invention includes a method for processing B pictures in a motion compensation system, comprising the steps of: comparing a motion vector magnitude of each macroblock in a B picture with a predetermined threshold; performing a routine decoding operation on each macroblock in which the motion vector magnitude is greater than the predetermined threshold; and copying a corresponding macroblock from a reference picture for each macroblock in which the motion vector magnitude is less than or equal to the predetermined threshold.
In a second aspect, the invention provides a method of processing contiguous B pictures by a motion compensation system, comprising the steps of: calculating an average motion vector magnitude for a first B picture; and replacing a next contiguous B picture with the first B picture if the average motion vector magnitude of the first B picture is less than or equal to a predetermined threshold.
In a third aspect, the invention provides a program product stored on a recordable medium for processing B pictures in a motion compensation system that when executed, comprises: a system for comparing a motion vector magnitude of each macroblock in a B picture with a predetermined threshold; a system for performing a routine decoding operation on each macroblock in which the motion vector magnitude is greater than the predetermined threshold; and a system for copying a corresponding macroblock from a previous picture for each macroblock in which the motion vector magnitude is less than or equal to the predetermined threshold.
In a fourth aspect, the invention provides a program product stored on a recordable medium for processing contiguous B pictures in a motion compensation system, which when executed comprises: a system for calculating an average motion vector magnitude for a first B picture; and a system for replacing a next contiguous B picture with the first B picture if the average motion vector magnitude is less than or equal to a predetermined threshold.
In a fifth aspect, the invention provides a decoder system having a motion compensation system, wherein the motion compensation system comprises: a system for comparing a motion vector magnitude of each macroblock in a B picture with a predetermined threshold; a system for performing a routine decoding operation for each macroblock in which the motion vector magnitude is greater than the predetermined threshold; and a system for copying a corresponding macroblock from a previous picture for each macroblock in which the motion vector magnitude is less than or equal to the predetermined threshold.
In a sixth aspect, the invention provides a decoder system having a motion compensation system, wherein the motion compensation system comprises: a system for calculating an average motion vector magnitude for a first B picture; and a system for replacing a next contiguous B picture with the first B picture if the average motion vector magnitude is less than or equal to a predetermined threshold.
In a seventh aspect, the invention provide a decoder system having a motion compensation system, wherein the motion compensation system comprises: a system for calculating an average motion vector magnitude for a reference picture; and a system for replacing a B picture with the reference picture if the average motion vector magnitude is less than or equal to a predetermined threshold.
Accordingly, it is an advantage of the present invention to provide a system for scaling the processing of B pictures in a video processing system.
It is a further advantage to provide a system and method for efficiently scaling a motion compensation system within a decoder while maintaining an acceptable level of output quality.